<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button onclick="showName()">点击显示姓名</button>
		  <script type="text/javascript">
		    function showName() {
				var name = prompt("请输入你的姓名", "姓名");
						alert("你输入的姓名是" + name);
				}
		</script>
	</body>
</html>